<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>{$sysinfo[sitetitle]}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
<script src="__PUBLIC__/js/jquery-2.1.1.min.js"></script>
   <link href="/bao/css/style.css" type="text/css" rel="stylesheet" />
<link href="__PUBLIC__/Weixin/css/index.css?v={:rand(0,99)}" rel="stylesheet" type="text/css">
<link href="__PUBLIC__/Weixin/css/head.css?v={:rand(0,99)}" rel="stylesheet" type="text/css">
<style></style>
<script>
$(document).ready(function () { 
   $('.pay2 .ptxt6').click(function(){
	   location.href='{:U("Index/hb?hbid=".$hbid)}';
   });
   $('.pay2 .ptxt5').click(function(){
	   $.post("{:U('Ajax/getfaqiancishu')}",{},function(res){
		   if(res.cishu < 99){
			   // callpay();
               calcodepay();
		   } else {
			    $('.msgbox .txt').text('今天超过上限，请明天再来！');
		        $('.msgbox').show();
		   }
	   });
   });
});
  
  //码支付
function calcodepay(){
   //alert('{$curld}/newpay/index.php?user={$hbid}&price={$djine}&orderid={$danhao}&ptype=1');
	location.href='{$curld}/newpay/index.php?user={$hbid}&price={$djine}&orderid={$danhao}&ptype=1'; 
}

function jsApiCall() {
		WeixinJSBridge.invoke(
			'getBrandWCPayRequest',
			{$jsApiParameters},
			function(res){
				if(res.err_msg == "get_brand_wcpay_request:ok"){
					//支付成功
					$("input[name='msgbox']").val(1);
			        $('.msgbox .txt').text('支付成功！');
		            $('.msgbox').show();
				}
			}
		);
}

function callpay()	{
		if (typeof WeixinJSBridge == "undefined"){
		    if( document.addEventListener ){
		        document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
		    } else if (document.attachEvent){
		        document.attachEvent('WeixinJSBridgeReady', jsApiCall); 
		        document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
		    }
		} else {
		    jsApiCall();
		}
}
</script>
</head>
 <body class="main_background">
        <div class="box padding_bottom02">
            <div class="top_02">
                 <img src="/bao/picture/top_bg.png" />
            </div>
            <div class="guang">
                <img id="img" src="/bao/picture/guang.png" />
            </div>
            <script type="text/javascript">
                $(document).ready(function() {
                    var angle = 0;
                    setInterval(function() {
                        angle += 3;
                        $("#img").rotate(angle);
                    },
                    100);
                });
            </script>
            <div class="center">
                <div class="c_b background_white b_r no_pt cb_p">
                    <div style="margin-bottom: 10px;margin-top: 25px;">
                        <div style="width: 100%;height:0px;line-height:20px;padding-top: 5px;padding-bottom: 5px;">
                            <div style="margin-left: 0;margin-right: 5px;">
                                <ul id="marquee" class="marquee" style="font-size: 15px;">
                                    <li>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
<body>
<div id="scroll_div" class="scroll_div">
    <div id="scroll_begin">
        <b>{$sysconfig[ctongzhi]}</b>
    </div>
    <div id="scroll_end"></div>
</div>
<div class="pay2">
  <p class="ptxt1">抢红包步骤</p>
  <p class="ptxt2">支付{$hb[hzhifue]/100}元必得一个红包</p>
  <p class="ptxt3">一、微信支付</p>
  <p class="ptxt4">￥<font class="price">{$hb[hzhifue]/100}</font></p>
  <p class="ptxt5">立即支付</p>
  <p class="ptxt3">二、支付完成后，记得去拆红包哦！</p>
  <p class="ptxt6">现在去抢红包</p>
</div>
<include file="Index/meno" />
<script>
function ScrollImgLeft() {
    var speed = 20
    var scroll_begin = document.getElementById("scroll_begin");
    var scroll_end = document.getElementById("scroll_end");
    var scroll_div = document.getElementById("scroll_div");
    scroll_end.innerHTML = scroll_begin.innerHTML

    function Marquee() {
        if(scroll_end.offsetWidth - scroll_div.scrollLeft <= 0)
            scroll_div.scrollLeft -= scroll_begin.offsetWidth
        else
            scroll_div.scrollLeft++
    }
    var MyMar = setInterval(Marquee, speed)
    scroll_div.onmouseover = function() {
        clearInterval(MyMar)
    }
    scroll_div.onmouseout = function() {
        MyMar = setInterval(Marquee, speed)
    }
}
ScrollImgLeft();
</script>
</body>
</html>